package com.andy.service.impl;

import com.andy.dao.entity.Resume;
import com.andy.dao.repository.ResumeDao;
import com.andy.service.ResumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ResumeServiceImpl implements ResumeService {

    @Autowired
    private ResumeDao resumeDao;

    @Override
    public List<Resume> getResumeAll() {
        List<Resume> all = resumeDao.findAll();
        return all;
    }

    @Override
    public void saveResume(Resume resume) {
        resumeDao.save(resume);
    }

    @Override
    public void deleteResume(Long id) {
        resumeDao.deleteById(id);
    }
}
